from base import Base
from selenium.webdriver.common.by import By
class Page(Base):
    def ssk(self):
        print('点击搜索框')
        loc=(By.ANDROID_UIAUTOMATOR,'new UiSelector().text("搜索菜谱")')
        ele=self.find_ele(loc)
        return ele
    def sr(self):
        print('输入搜索内容')
        loc=(By.CLASS_NAME,'android.widget.EditText')
        ele=self.find_ele(loc)
        return ele
    def djss(self):
        print('点击搜索按钮')
        loc=(By.XPATH,'//android.widget.TextView[@text="搜索"]')
        ele=self.find_ele(loc)
        return ele
    def tp(self):
        print('点击图片')
        loc=(By.XPATH,'(//android.widget.ImageView[@resource-id="com.xiachufang:id/common_photo_image_view"])[1]')
        ele=self.find_ele(loc)
        return ele
    def tc(self):
        print('点击退出按钮')
        loc=(By.XPATH,'//android.widget.ImageView[@content-desc="返回"]')
        ele=self.find_ele(loc)
        return ele
    def tclb(self):
        print('点击退出列表按钮')
        loc = (By.ID, 'com.xiachufang:id/navigation_img_view')
        ele = self.find_ele(loc)
        return ele
    def dy(self):
        print('断言综合是否存在')
        loc=(By.ANDROID_UIAUTOMATOR,'new UiSelector().text("综合")')
        ele=self.find_ele(loc)
        return ele